// 处理token的相关数据

const TOKEN_KEY = 'itcast_geek_pc'
// 获取token
const getToken = () => localStorage.getItem(TOKEN_KEY)
// 设置token
const setToken = (token) => localStorage.setItem(TOKEN_KEY, token)
// 清除token
const clearToken = () => localStorage.removeItem(TOKEN_KEY)
// 是否有权限
const isAuth = () => !!getToken()
// 导出
export { isAuth, setToken, clearToken, getToken }
